package com.twu.biblioteca;

import java.util.ArrayList;

public class Menu {
    private ArrayList<String> options;

    public Menu(ArrayList<String> options) {

        this.options = options;
    }

    public Menu(){
        Initialize();
    }
    private void Initialize() {
        options = new ArrayList<String>();
        options.add("View");
        options.add("Reserve a book");
        options.add("View Details");
        options.add("Movies");
    }

    @Override
    public String toString() {
        StringBuffer displayMenu = new StringBuffer();
        int optionNumber = 1;

        for (String option: options){
            displayMenu
                    .append(optionNumber)
                    .append(". ")
                    .append(option)
                    .append("\n");
            optionNumber++;
        }
        return displayMenu.toString();
    }

    public boolean validate(int option) {
        if (option != 5){
            return true;
        }  else {
            return false;
        }
    }

}
